# $Id: PKGBUILD 85586 2013-03-03 17:28:52Z dreisner $
# Maintainer: Jonathan Steel <mail@jsteel.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Contributor: Jason Chu <jason@archlinux.org>
# Contributor: Joker-jar <joker-jar@yandex.ru>

pkgname=dgen-sdl
pkgver=1.32
pkgrel=2
pkgdesc="An emulator for Sega Genesis/Mega Drive systems ported to SDL"
arch=('i686' 'x86_64')
url="http://dgen.sourceforge.net"
license=('BSD')
depends=('sdl' 'libgl' 'libarchive')
if test "$CARCH" == i686; then
  makedepends=('nasm')
fi
source=(http://downloads.sourceforge.net/dgen/$pkgname-$pkgver.tar.gz)
md5sums=('81b6f1c4bd612e81a9b8663c38d51890')

build() {
  cd "$srcdir"/$pkgname-$pkgver

  ./configure --prefix=/usr

  make
}

package() {
  cd "$srcdir"/$pkgname-$pkgver

  make DESTDIR="$pkgdir"/ install

  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
